import { ref, onMounted } from "vue"
import api from "../../../api/index"

export function useOrder(type:string) {
    
    const orderList = ref()
    onMounted(() => {
        api.getOrderType({ type }).then(res => {
            if (res.data.status === 200) {
                orderList.value = res.data.data
            }
        })
    })

    return {
        orderList
    }
}

